using Aurora.AI.Wiki.Domain.Domain.ChatApplications.Aggregates;

namespace Aurora.AI.Wiki.Domain.Domain.ChatApplications.Repositories;

public interface IChatApplicationRepository
{
    Task<List<ChatApplication>> GetListAsync(int page, int pageSize);

    Task<int> GetCountAsync();

    /// <summary>
    /// 创建应用
    /// </summary>
    /// <param name="application"></param>
    /// <returns></returns>
    Task CreateApplication(ChatApplication application);


    /// <summary>
    /// 创建聊天记录
    /// </summary>
    /// <param name="record"></param>
    /// <returns></returns>
    Task CreateChatRecord(ChatRecord record);

    /// <summary>
    /// 获取应用详情
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    Task<ChatApplication> GetByIdAsync(string id);

    /// <summary>
    /// 创建对话
    /// </summary>
    /// <param name="chatDialog"></param>
    /// <returns></returns>
    Task<string> CreateChatDialogAsync(ChatApplicationDialog chatDialog);

    /// <summary>
    /// 更新对话
    /// </summary>
    /// <param name="chatDialog"></param>
    /// <returns></returns>
    Task<bool> UpdateChatDialogAsync(ChatApplicationDialog chatDialog);

    /// <summary>
    /// 根据id 获取 dialog
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    Task<ChatApplicationDialog> GetChatDialogByIdAsync(string id);

    /// <summary>
    /// 删除对话
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    Task RemoveChatDialogAsync(string id);

    //
    /// <summary>
    /// 获取对话列表
    /// </summary>
    /// <returns></returns>
    Task<List<ChatApplicationDialog>> GetChatDialogListAsync(string applicationId, string aiType);

    //
    // /// <summary>
    // /// 创建对话记录
    // /// </summary>
    // /// <returns></returns>
    // Task CreateChatDialogHistoryAsync(ChatDialogHistory chatDialogHistory);
    //
    /// <summary>
    /// 获取对话记录
    /// </summary>
    /// <param name="dialogId"></param>
    /// <returns></returns>
    Task<List<ChatRecord>> GetChatRecordListAsync(string dialogId);

    // /// <summary>
    // /// 获取对话记录数量
    // /// </summary>
    // /// <param name="chatDialogId"></param>
    // /// <returns></returns>
    // Task<long> GetChatDialogHistoryCountAsync(string chatDialogId);
    //
    // /// <summary>
    // /// 删除对话记录数量
    // /// </summary>
    // /// <param name="chatDialogId"></param>
    // /// <returns></returns>
    // Task RemoveChatDialogHistoryAsync(string chatDialogId);
    //
    // /// <summary>
    // /// 删除指定id的数据
    // /// </summary>
    // /// <param name="id"></param>
    // /// <returns></returns>
    // Task RemoveChatDialogHistoryByIdAsync(string id);
}